<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>rem适配</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        /* @media (width:320px) {
            html {
                font-size: 32px;
            }
        }

        @media (width:375px) {
            html {
                font-size: 37.5px;
            }
        }

        @media (width:414px) {
            html {
                font-size: 41.4px;
            }
        } */

        .box {
            width: 5rem;
            height: 3rem;
            background-color: red;
        }
    </style>
</head>

<body>
    <div class="box"></div>
    <script src="./js/flexible.js"></script>


</body>

</html>